// import  { Carousel } from 'antd';
import React from 'react';
import '../css/del.css'
import { Link } from 'react-router-dom';




class Tab extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            current: 1
            
        }
    }
    tabFn(index) {
        this.setState({
            current: index
        })
    }
    clsFn(index, curCls, cls) {
        let { current } = this.state;
        console.log(current)
        return current === index ? curCls : cls;
    }
    componentDidMount() {
        this.tabFn(1)
    }
    render() {
        let { current } = this.state;
        return (




<div className='del-footer'>
    <ol className='abb1'>
                        <li onClick={() => { this.tabFn(1) }} className={this.clsFn(1,  '')}>
                            <span className='product'>产品说明</span>
                        </li>
                        <li onClick={() => { this.tabFn(2) }} className={this.clsFn(2, '')}>
                       <span className='product1'>产品参数</span> 
                        </li>
                    </ol>       


                    <ul className='acc1'>
                        <li className={this.clsFn(1, 'current', '')}>
                        <div className='img-box1'><img src='http://127.0.0.1:7001/public/whj/1.jpg' alt='' /></div>
                        </li>
                        <li className={this.clsFn(2, 'current', '')}>
                        <div className='img-box1'><img src='http://127.0.0.1:7001/public/whj/2.jpg' alt='' /></div>
                        </li>
                    </ul> 


</div>




            
       );
    }
}

export default Tab